import { createApp } from 'vue'
import router from './router'
import App from './App.vue'
import {
    ElButton,
    ElForm,
    ElFormItem,
    ElInput,
    ElMenu,
    ElMenuItem,
    ElAvatar,
    ElPopover,
    ElTable,
    ElTableColumn,
    ElTag,
    ElImage,
    ElCheckboxGroup,
    ElCheckbox,
    ElUpload,
    ElDialog,
    ElPopconfirm,
    ElPagination
} from 'element-plus';
import 'element-plus/packages/theme-chalk/src/base.scss'

// 使用md编辑器
import VueMarkdownEditor from '@kangc/v-md-editor'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js'
import '@kangc/v-md-editor/lib/theme/style/vuepress.css'
VueMarkdownEditor.use(vuepressTheme)


const ELComponents = [ElButton, ElForm, ElFormItem, ElInput, ElMenu,
    ElMenuItem, ElAvatar, ElPopover, ElTable, ElTableColumn, ElTag, ElImage,
    ElCheckboxGroup, ElCheckbox, ElUpload, ElDialog, ElPopconfirm, ElPagination
]

const app = createApp(App)

app.use(router)

ELComponents.forEach(component => {
    app.component(component.name, component)
})

app.use(VueMarkdownEditor)

app.mount('#app')
